{NeoBook Function}


Language=VBScript
Comment=The function to connect to. WAV files
Param=[%1]|Text|Name and path of the 1st file (with extension)
Param=[%2]|Text|Name and path of the 2nd file (with extension)
Param=[%0]|Text|Name and path of the linked file
Param=%00|Variable|variable end of gluing
{End}
On Error Resume Next

'###############################
' Author: Andrei Solodyankin (as3856) 
' mail : as3856@rambler.ru
' www/neobooker.ru
'###############################

Dim s
 s = 0
  Set oFileStream = CreateObject("SAPI.SpFileStream")
  oFileStream.Format.Type = 39     'Const SAFT48kHz16BitStereo = 39
  oFileStream.Open "[%0]", 3 '   

   Set sapi=CreateObject("SAPI.SpVoice")
   Set sapi.AudioOutputStream = oFileStream '    

      Set objFile = CreateObject("SAPI.SpFileStream.1")
      objFile.Open("[%1]") '   Wav    
      sapi.Speakstream objFile '   

      Set objFile = Nothing

      Set objFile = CreateObject("SAPI.SpFileStream.1")
      objFile.Open("[%2]") '   Wav    
      sapi.Speakstream objFile '   

     Set objFile = Nothing
     Set sapi = Nothing

   oFileStream.Close '  
 s = 1
 
 publication.nbSetVar "%00",s
